3.3 \(\int (a+b \sec ^2(e+f x)) \sin ^3(e+f x) \, dx\)

Optimal. Leaf size=44 \[ -\frac{(a-b) \cos (e+f x)}{f}+\frac{a \cos ^3(e+f x)}{3 f}+\frac{b \sec (e+f x)}{f} \]

[Out]

-(((a - b)*Cos[e + f*x])/f) + (a*Cos[e + f*x]^3)/(3*f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0389122, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4133, 448} \[ -\frac{(a-b) \cos (e+f x)}{f}+\frac{a \cos ^3(e+f x)}{3 f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^3,x]

[Out]

-(((a - b)*Cos[e + f*x])/f) + (a*Cos[e + f*x]^3)/(3*f) + (b*Sec[e + f*x])/f

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^3(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right ) \left (b+a x^2\right )}{x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a \left (1-\frac{b}{a}\right )+\frac{b}{x^2}-a x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{(a-b) \cos (e+f x)}{f}+\frac{a \cos ^3(e+f x)}{3 f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0324777, size = 53, normalized size = 1.2 \[ -\frac{3 a \cos (e+f x)}{4 f}+\frac{a \cos (3 (e+f x))}{12 f}+\frac{b \cos (e+f x)}{f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^3,x]

[Out]

(-3*a*Cos[e + f*x])/(4*f) + (b*Cos[e + f*x])/f + (a*Cos[3*(e + f*x)])/(12*f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.041, size = 62, normalized size = 1.4 \begin{align*}{\frac{1}{f} \left ( -{\frac{a \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}+b \left ({\frac{ \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{\cos \left ( fx+e \right ) }}+ \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e)^3,x)

[Out]

1/f*(-1/3*a*(2+sin(f*x+e)^2)*cos(f*x+e)+b*(sin(f*x+e)^4/cos(f*x+e)+(2+sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

Maxima [A]  time = 0.975774, size = 54, normalized size = 1.23 \begin{align*} \frac{a \cos \left (f x + e\right )^{3} - 3 \,{\left (a - b\right )} \cos \left (f x + e\right ) + \frac{3 \, b}{\cos \left (f x + e\right )}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^3,x, algorithm="maxima")

[Out]

1/3*(a*cos(f*x + e)^3 - 3*(a - b)*cos(f*x + e) + 3*b/cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.01928, size = 100, normalized size = 2.27 \begin{align*} \frac{a \cos \left (f x + e\right )^{4} - 3 \,{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 3 \, b}{3 \, f \cos \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^3,x, algorithm="fricas")

[Out]

1/3*(a*cos(f*x + e)^4 - 3*(a - b)*cos(f*x + e)^2 + 3*b)/(f*cos(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.27419, size = 82, normalized size = 1.86 \begin{align*} \frac{b}{f \cos \left (f x + e\right )} + \frac{a f^{5} \cos \left (f x + e\right )^{3} - 3 \, a f^{5} \cos \left (f x + e\right ) + 3 \, b f^{5} \cos \left (f x + e\right )}{3 \, f^{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^3,x, algorithm="giac")

[Out]

b/(f*cos(f*x + e)) + 1/3*(a*f^5*cos(f*x + e)^3 - 3*a*f^5*cos(f*x + e) + 3*b*f^5*cos(f*x + e))/f^6